package com.zhentao.controller;

import com.zhentao.pojo.Role;
import com.zhentao.service.RoleService;
import com.zhentao.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/role")
public class RoleController {
    @Autowired
    private RoleService roleService;

    @RequestMapping("findRole")
    public Result findRole(){
        List<Role> list = roleService.list();
        return Result.OK(list);
    }
}
